﻿#region <!-- Using Directives -->

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

using WordSharpDev.Controls;
using WordSharpDev.Extensions;
using WordSharpDev.Utils;
using WordSharpDev.Work;

using Word = Microsoft.Office.Interop.Word;

#endregion

namespace WordSharpDev
{
	internal static class Share
	{
		#region <!-- Application -->

		public static readonly Word.Application Application;

		#endregion

		#region <!-- Document -->

		public static readonly ThisDocument Document;

		#endregion

		#region <!-- Project -->

		public static readonly WordSharpProject Project;

		#endregion

		#region <!-- Build -->

		public static WordSharpBuild Build;

		#endregion

		#region <!-- UI -->

		public static readonly WordSharpPane UIAppPane;

		public static Int32 UIDialogChoice;

		#endregion

		static Share()
		{
			Application = Globals.ThisDocument.Application;

			Document = Globals.ThisDocument;

			Project = new WordSharpProject();

			UIAppPane = new WordSharpPane();
		}

		#region <!-- FormatException -->

		public static String FormatException(Exception p_Exception, String p_Indent = "")
		{
			return p_Exception.ToXmlNode().OuterXml.FormatXml().Indent(p_Indent);
		}

		#endregion

		#region <!-- GetRect -->

		public static Rect GetAppRect()
		{
			return new Rect(Application.Left, Application.Top, Application.Width, Application.Height);
		}

		#endregion
	}
}